// -----------------------------------------------------------------------
//  <copyright file="IDomainEventBus.cs" company="LiuliuSoft">
//      Copyright (c) 2022-2022 DaprPlus. All rights reserved.
//  </copyright>
//  <site>https://www.dapr.plus</site>
//  <last-editor>郭明锋</last-editor>
//  <last-date>2022-11-06 21:32</last-date>
// -----------------------------------------------------------------------

namespace DaprPlus.Domain.Events;

/// <summary>
/// 定义领域事件总线
/// </summary>
public interface IDomainEventBus
{
    /// <summary>
    /// 发布领域事件
    /// </summary>
    /// <param name="event">领域事件</param>
    /// <param name="token"></param>
    /// <returns></returns>
    Task PublishAsync(DomainEvent @event, CancellationToken token = default);
}
